package com.moore.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.moore.bean.Work;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface WorkMapper extends BaseMapper<Work> {

    List<Work> getWorks(@Param("positionId") Integer positionId, @Param("location") String location, @Param("keyword") String keyword, @Param("curr") Integer curr, @Param("size") Integer size);

    List<Work> getWorksByFilter(@Param("filters") Map<String, Object> filters, @Param("curr") Integer curr, @Param("size") Integer size);

    int getWorksCount(@Param("positionId") Integer positionId, @Param("location") String location, @Param("keyword") String keyword);

    int getWorksByFilterCount(@Param("filters") Map<String, Object> filters);

    Work getWorkById(Integer id);
}
